import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
import Layout from '@/layout'

/**
 * Note: sub-menu only appear when route children.length >= 1
 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
 *
 * hidden: true                   if set true, item will not show in the sidebar(default is false)
 * alwaysShow: true               if set true, will always show the root menu
 *                                if not set alwaysShow, when item has more than one children route,
 *                                it will becomes nested mode, otherwise not show the root menu
 * redirect: noRedirect           if set noRedirect will no redirect in the breadcrumb
 * name:'router-name'             the name is used by <keep-alive> (must set!!!)
 * meta : {
    roles: ['admin','editor']    control the page roles (you can set multiple roles)
    title: 'title'               the name show in sidebar and breadcrumb (recommend set)
    icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
    noCache: true                if set true, the page will no be cached(default is false)
    affix: true                  if set true, the tag will affix in the tags-view
    breadcrumb: false            if set false, the item will hidden in breadcrumb(default is true)
    activeMenu: '/example/list'  if set path, the sidebar will highlight the path you set
  }
 */

/**
 * constantRoutes
 * a base page that does not have permission requirements
 * all roles can be accessed
 */
export const constantRoutes = [
  {
    path: '/redirect',
    component: Layout,
    hidden: true,
    children: [
      {
        path: '/redirect/:path(.*)',
        component: () => import('@/views/redirect/index')
      }
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },
  {
    path: '/auth-redirect',
    component: () => import('@/views/login/auth-redirect'),
    hidden: true
  },
  {
    path: '/404',
    component: () => import('@/views/error-page/404'),
    hidden: true
  },
  {
    path: '/401',
    component: () => import('@/views/error-page/401'),
    hidden: true
  },
  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [
      {
        path: 'dashboard',
        component: () => import('@/views/dashboard/index'),
        name: 'Dashboard',
        meta: { title: '后台首页', icon: 'dashboard', affix: true }
      }
    ]
  },
  {
    path: '/index-img',
    component: () => import('@/views/dashboard/index_image'),
    hidden: true
  }
]

/**
 * asyncRoutes
 * the routes that need to be dynamically loaded based on user roles
 */
export const asyncRoutes = [
  {
    path: '/error',
    component: Layout,
    redirect: 'noRedirect',
    name: 'ErrorPages',
    meta: {
      title: 'Error Pages',
      icon: '404'
    },
    hidden: true,
    children: [
      {
        path: '401',
        component: () => import('@/views/error-page/401'),
        name: 'Page401',
        meta: { title: '401', noCache: true }
      },
      {
        path: '404',
        component: () => import('@/views/error-page/404'),
        name: 'Page404',
        meta: { title: '404', noCache: true }
      }
    ]
  },
  {
    path: '/asset',
    component: Layout,
    redirect: 'noRedirect',
    name: 'asset',
    meta: {
      title: '资产管理',
      icon: 'icon-zichan',
      roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
    },
    children: [
      {
        path: '/asset/factory_base',
        hidden: true,
        component: () => import('@/views/asset/factory/factory_index'),
        meta: {
          title: '厂房管理',
          roles: [16]
        },
        name: '厂房管理',
        children: [
          {
            path: '/asset/qrcode',
            component: () => import('@/views/asset/qrcode/qrcode.vue'),
            name: 'factory',
            meta: {
              title: '工厂管理',
              roles: [16]
            }
          },
          {
            path: '/asset/factory',
            component: () => import('@/views/asset/factory/factory.vue'),
            name: '工厂管理',
            meta: {
              title: '工厂管理',
              roles: [16]
            }
          },
          {
            path: '/asset/factory/factory_add',
            name: '增加工厂',
            hidden: true,
            meta: {
              title: '增加工厂',
              roles: [16]
            },
            component: () => import('@/views/asset/factory/factory_add.vue')
          },
          {
            path: '/asset/factory/factory_edit/:id',
            name: '更新工厂',
            hidden: true,
            meta: {
              title: '更新工厂',
              roles: [16]
            },
            component: () => import('@/views/asset/factory/factory_edit.vue')
          },
          {
            path: '/asset/workshop',
            component: () => import('@/views/asset/workshop/workshop.vue'),
            name: 'workshop',
            meta: {
              title: '车间管理',
              roles: [16]
            }
          },
          {
            path: '/asset/workshop/workshop_add',
            name: '增加车间',
            hidden: true,
            meta: {
              title: '增加车间',
              roles: [16]
            },
            component: () => import('@/views/asset/workshop/workshop_add.vue')
          },
          {
            path: '/asset/workshop/workshop_edit/:id',
            name: '更新车间',
            hidden: true,
            meta: {
              title: '更新车间',
              roles: [16]
            },
            component: () => import('@/views/asset/workshop/workshop_edit.vue')
          },
          {
            path: '/asset/line',
            component: () => import('@/views/asset/line/line.vue'),
            name: 'line',
            meta: {
              title: '生产线管理',
              roles: [16]
            }
          },
          {
            path: '/asset/line/line_add',
            name: '增加生产线',
            hidden: true,
            meta: {
              title: '增加生产线',
              roles: [16]
            },
            component: () => import('@/views/asset/line/line_add.vue')
          },
          {
            path: '/asset/line/line_edit/:id',
            name: '更新生产线',
            hidden: true,
            meta: {
              title: '更新生产线',
              roles: [16]
            },
            component: () => import('@/views/asset/line/line_edit.vue')
          },
          {
            path: '/asset/process',
            component: () => import('@/views/asset/process/process.vue'),
            name: 'process',
            meta: {
              title: '工序工位',
              roles: [16]
            }
          },
          {
            path: '/asset/process/process_add',
            name: '增加工序工位',
            hidden: true,
            meta: {
              title: '增加工序工位',
              roles: [16]
            },
            component: () => import('@/views/asset/process/process_add.vue')
          },
          {
            path: '/asset/process/process_edit/:id',
            name: '更新工序工位',
            hidden: true,
            meta: {
              title: '更新工序工位',
              roles: [16]
            },
            component: () => import('@/views/asset/process/process_edit.vue')
          }
        ]
      },
      {
        path: '/asset/equipment_base',
        component: () => import('@/views/asset/equipment/equipment_index.vue'),
        name: '设备管理',
        meta: {
          title: '设备管理',
          roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
        },
        children: [
          {
            path: '/asset/equipment',
            component: () => import('@/views/asset/equipment/equipment'),
            name: 'equipment',
            meta: {
              title: '设备台账',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
            }
          },
          {
            path: '/asset/equipment/equipment_add',
            component: () => import('@/views/asset/equipment/detail'),
            name: '新增设备',
            hidden: true,
            meta: {
              title: '新增设备',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100],
              activeMenu: '/asset/equipment'
            }
          },
          {
            path: '/asset/equipment/equipment_edit/:id',
            component: () => import('@/views/asset/equipment/detail'),
            name: '更新设备',
            hidden: true,
            meta: {
              title: '更新设备',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100],
              activeMenu: '/asset/equipment'
            }
          }
        ]
      },
      {
        path: '/asset/group_base',
        component: () => import('@/views/asset/group/group_index.vue'),
        name: '设备组管理',
        hidden: true,
        meta: {
          title: '设备组管理',
          roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
        },
        children: [
          {
            path: '/asset/group',
            component: () => import('@/views/asset/group/group.vue'),
            name: '设备组',
            meta: {
              title: '设备组',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
            }
          },
          {
            path: '/asset/group/group_add',
            component: () => import('@/views/asset/group/group_add.vue'),
            name: '新增设备组',
            hidden: true,
            meta: {
              title: '新增设备组',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
            }
          },
          {
            path: '/asset/group/group_edit/:id',
            component: () => import('@/views/asset/group/group_edit.vue'),
            name: '更新设备组',
            hidden: true,
            meta: {
              title: '更新设备组',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
            }
          }
        ]
      },
      {
        path: '/asset/param_base',
        component: () => import('@/views/asset/param/param_index.vue'),
        name: '设备参数管理',
        hidden: false,
        meta: {
          title: '设备参数',
          roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
        },
        children: [
          {
            path: '/asset/param',
            component: () => import('@/views/asset/param/param.vue'),
            name: '设备参数',
            meta: {
              title: '设备参数',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
            }
          },
          {
            path: '/asset/param/param_add',
            component: () => import('@/views/asset/param/param_add.vue'),
            name: '新增参数',
            hidden: true,
            meta: {
              title: '新增参数',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
            }
          },
          {
            path: '/asset/param/param_edit/:id',
            component: () => import('@/views/asset/param/param_edit.vue'),
            name: '更新参数',
            hidden: true,
            meta: {
              title: '更新参数',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
            }
          }
        ]
      },
      {
        path: '/asset/jig_base',
        component: () => import('@/views/asset/jig/jig_index.vue'),
        name: '工装管理',
        meta: {
          title: '工装管理',
          roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
        },
        children: [
          {
            path: '/asset/jig',
            component: () => import('@/views/asset/equipment/equipment'),
            name: 'jig',
            meta: {
              title: '工装台账',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
            }
          },
          {
            path: '/asset/jig/jig_add',
            component: () => import('@/views/asset/equipment/detail'),
            name: '新增工装',
            hidden: true,
            meta: {
              title: '新增工装',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100],
              activeMenu: '/asset/jig'
            }
          },
          {
            path: '/asset/jig/jig_edit/:id',
            component: () => import('@/views/asset/equipment/detail'),
            name: '更新工装',
            hidden: true,
            meta: {
              title: '更新工装',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100],
              activeMenu: '/asset/jig'
            }
          }
        ]
      },
      {
        path: '/asset/installation_base',
        component: () => import('@/views/asset/equipment/equipment_index.vue'),
        name: '设施管理',
        meta: {
          title: '设施管理',
          roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
        },
        children: [
          {
            path: '/asset/installation',
            component: () => import('@/views/asset/equipment/equipment'),
            name: 'installation',
            meta: {
              title: '设施台账',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
            }
          },
          {
            path: '/asset/installation/installation_add',
            component: () => import('@/views/asset/equipment/detail'),
            name: '新增设施',
            hidden: true,
            meta: {
              title: '新增设施',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100],
              activeMenu: '/asset/installation'
            }
          },
          {
            path: '/asset/installation/installation_edit/:id',
            component: () => import('@/views/asset/equipment/detail'),
            name: '更新设施',
            hidden: true,
            meta: {
              title: '更新设施',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100],
              activeMenu: '/asset/installation'
            }
          }
        ]
      },
      {
        path: '/asset/turn_base',
        component: () => import('@/views/asset/turn/turn_index.vue'),
        name: '启停设备管理',
        hidden: true,
        meta: {
          title: '启停设备',
          roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
        },
        children: [
          {
            path: '/asset/turn',
            component: () => import('@/views/asset/turn/turn.vue'),
            name: '设备启停',
            meta: {
              title: '设备启停',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
            }
          },
          {
            path: '/asset/turn/turn_add',
            component: () => import('@/views/asset/turn/turn_add.vue'),
            name: '新增启停',
            hidden: true,
            meta: {
              title: '新增启停',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
            }
          },
          {
            path: '/asset/turn/turn_edit/:id',
            component: () => import('@/views/asset/turn/turn_edit.vue'),
            name: '更新启停',
            hidden: true,
            meta: {
              title: '更新启停',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 122, 100]
            }
          }
        ]
      },
      {
        path: '/asset/management_base',
        component: () => import('@/views/asset/management/management_index.vue'),
        name: '处置设备管理',
        hidden: true,
        meta: {
          title: '处置设备',
          roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
        },
        children: [
          {
            path: '/asset/management',
            component: () => import('@/views/asset/management/management.vue'),
            name: '设备处置申请',
            meta: {
              title: '设备处置申请',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
            }
          },
          {
            path: '/asset/management/management_add',
            component: () => import('@/views/asset/management/management_add.vue'),
            name: '新增处置申请',
            hidden: true,
            meta: {
              title: '新增处置申请',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
            }
          },
          {
            path: '/asset/management/management_edit/:id',
            component: () => import('@/views/asset/management/management_edit.vue'),
            name: '更新处置申请',
            hidden: true,
            meta: {
              title: '更新处置申请',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
            }
          }
        ]
      },
      {
        path: '/asset/category_base',
        component: () => import('@/views/asset/category/category_index.vue'),
        hidden: true,
        name: '设备分类管理',
        meta: {
          title: '设备分类',
          roles: [16]
        },
        children: [
          {
            path: '/asset/category',
            component: () => import('@/views/asset/category/category.vue'),
            name: '设备分类',
            meta: {
              title: '设备分类',
              roles: [16]
            }
          },
          {
            path: '/asset/category/category_add',
            component: () => import('@/views/asset/category/category_add.vue'),
            name: '新增设备分类',
            hidden: true,
            meta: {
              title: '新增设备分类',
              roles: [16]
            }
          },
          {
            path: '/asset/category/category_edit/:id',
            component: () => import('@/views/asset/category/category_edit.vue'),
            name: '更新设备分类',
            hidden: true,
            meta: {
              title: '更新设备分类',
              roles: [16]
            }
          }
        ]
      }
    ]
  },
  {
    path: '/stock',
    component: Layout,
    redirect: 'noRedirect',
    name: 'stock',
    meta: {
      title: '备件管理',
      icon: 'iconfont icon-beijiancangku',
      roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
    },
    children: [
      {
        path: '/stock/parts_base',
        component: () => import('@/views/stock/parts/parts_index.vue'),
        name: '备件管理',
        meta: {
          title: '备件管理',
          roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
        },
        children: [
          {
            path: '/stock/parts',
            component: () => import('@/views/stock/parts/parts.vue'),
            name: '备件台账',
            meta: {
              title: '备件台账',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
            }
          },
          {
            path: '/stock/parts/parts_add',
            component: () => import('@/views/stock/parts/parts_add.vue'),
            name: '新增备件',
            hidden: true,
            meta: {
              title: '新增备件',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/stock/parts'
            }
          },
          {
            path: '/stock/parts/parts_edit/:id',
            component: () => import('@/views/stock/parts/parts_edit.vue'),
            name: '更新备件',
            hidden: true,
            meta: {
              title: '更新备件',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/stock/parts'
            }
          }
        ]
      },
      {
        path: '/stock/procurement_base',
        component: () => import('@/views/stock/apply/apply_index.vue'),
        meta: {
          title: '备件采购',
          roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 114, 119, 120, 121, 124, 125, 128]
        },
        name: '备件采购',
        children: [
          {
            path: '/stock/apply',
            component: () => import('@/views/stock/apply/apply.vue'),
            name: '备件采购申请',
            meta: {
              title: '备件采购申请',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            }
          },
          {
            path: '/stock/apply/apply_add',
            name: '增加备件采购申请',
            hidden: true,
            meta: {
              title: '增加备件采购申请',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/stock/apply'
            },
            component: () => import('@/views/stock/apply/apply_add.vue')
          },
          {
            path: '/stock/apply/apply_edit/:id',
            name: '更新备件采购申请',
            hidden: true,
            meta: {
              title: '更新备件采购申请',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/stock/apply'
            },
            component: () => import('@/views/stock/apply/apply_edit.vue')
          },
          {
            path: '/stock/order',
            component: () => import('@/views/stock/order/order.vue'),
            name: '备件采购订单',
            meta: {
              title: '备件采购订单',
              roles: [16, 112, 113, 114, 128]
            }
          },
          {
            path: '/stock/order/order_add',
            name: '增加备件采购订单',
            hidden: true,
            meta: {
              title: '增加备件采购订单',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/stock/order'
            },
            component: () => import('@/views/stock/order/order_add.vue')
          },
          {
            path: '/stock/order/order_edit/:id',
            name: '更新备件采购订单',
            hidden: true,
            meta: {
              title: '更新备件采购订单',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/stock/order'
            },
            component: () => import('@/views/stock/order/order_edit.vue')
          }
        ]
      },
      {
        path: '/stock/enter_base',
        component: () => import('@/views/stock/enter/enter_index.vue'),
        name: '入库管理',
        meta: {
          title: '入库管理',
          roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
        },
        children: [
          {
            path: '/stock/enter',
            component: () => import('@/views/stock/enter/enter.vue'),
            name: '收货入库',
            meta: {
              title: '收货入库',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/stock/enter'
            }
          },
          {
            path: '/stock/enter/enter_add',
            component: () => import('@/views/stock/enter/enter_add.vue'),
            name: '新增入库单',
            hidden: true,
            meta: {
              title: '新增入库单',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/stock/enter'
            }
          },
          {
            path: '/stock/enter/enter_edit/:id',
            component: () => import('@/views/stock/enter/enter_edit.vue'),
            name: '更新入库单',
            hidden: true,
            meta: {
              title: '更新入库单',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/stock/enter'
            }
          }
        ]
      },
      {
        path: '/stock/appear_base',
        component: () => import('@/views/stock/appear/appear_index.vue'),
        name: '出库管理',
        meta: {
          title: '出库管理',
          roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
        },
        children: [
          {
            path: '/stock/appear',
            component: () => import('@/views/stock/appear/appear.vue'),
            name: '领取出库',
            meta: {
              title: '领取出库',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/stock/appear'
            }
          },
          {
            path: '/stock/appear/appear_add',
            component: () => import('@/views/stock/appear/appear_add.vue'),
            name: '新增出库单',
            hidden: true,
            meta: {
              title: '新增出库单',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/stock/appear'
            }
          },
          {
            path: '/stock/appear/appear_edit/:id',
            component: () => import('@/views/stock/appear/appear_edit.vue'),
            name: '更新出库单',
            hidden: true,
            meta: {
              title: '更新出库单',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/stock/appear'
            }
          }
        ]
      },
      {
        path: '/stock/back_base',
        component: () => import('@/views/stock/back/back_index.vue'),
        name: '退还管理',
        meta: {
          title: '退还管理',
          roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
        },
        children: [
          {
            path: '/stock/back',
            component: () => import('@/views/stock/back/back.vue'),
            name: '备件退还',
            meta: {
              title: '备件退还',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/stock/back'
            }
          },
          {
            path: '/stock/back/back_add',
            component: () => import('@/views/stock/back/back_add.vue'),
            name: '新增退还单',
            hidden: true,
            meta: {
              title: '新增退还单',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/stock/back'
            }
          },
          {
            path: '/stock/back/back_edit/:id',
            component: () => import('@/views/stock/back/back_edit.vue'),
            name: '更新退还单',
            hidden: true,
            meta: {
              title: '更新退还单',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/stock/back'
            }
          }
        ]
      },
      {
        path: '/stock/take_base',
        component: () => import('@/views/stock/take/take_index.vue'),
        name: '盘点管理',
        meta: {
          title: '盘点管理',
          roles: [16, 112, 113, 114, 115]
        },
        children: [
          {
            path: '/stock/take',
            component: () => import('@/views/stock/take/take.vue'),
            name: '库存盘点',
            meta: {
              title: '库存盘点',
              roles: [16, 112, 113, 114, 115],
              activeMenu: '/stock/take'
            }
          },
          {
            path: '/stock/take/take_add',
            component: () => import('@/views/stock/take/take_add.vue'),
            name: '新增盘点单',
            hidden: true,
            meta: {
              title: '新增盘点单',
              roles: [16, 112, 113, 114, 115],
              activeMenu: '/stock/take'
            }
          },
          {
            path: '/stock/take/take_edit/:id',
            component: () => import('@/views/stock/take/take_edit.vue'),
            name: '更新盘点单',
            hidden: true,
            meta: {
              title: '更新盘点单',
              roles: [16, 112, 113, 114, 115],
              activeMenu: '/stock/take'
            }
          }
        ]
      },
      {
        path: '/stock/category_base',
        component: () => import('@/views/stock/category/category_index.vue'),
        hidden: true,
        name: '分类管理',
        meta: {
          title: '分类管理',
          roles: [16]
        },
        children: [
          {
            path: '/stock/category',
            component: () => import('@/views/stock/category/category.vue'),
            name: '备件分类',
            meta: {
              title: '备件分类',
              roles: [16]
            }
          },
          {
            path: '/stock/category/category_add',
            component: () => import('@/views/stock/category/category_add.vue'),
            name: '新增分类',
            hidden: true,
            meta: {
              title: '新增分类',
              roles: [16]
            }
          },
          {
            path: '/stock/category/category_edit/:id',
            component: () => import('@/views/stock/category/category_edit.vue'),
            name: '更新分类',
            hidden: true,
            meta: {
              title: '更新分类',
              roles: [16]
            }
          }
        ]
      }
    ]
  },
  {
    path: '/tool',
    component: Layout,
    redirect: 'noRedirect',
    name: 'tool',
    meta: {
      title: '工具管理',
      icon: 'iconfont icon-gongju',
      roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
    },
    children: [
      {
        path: '/tool/tool_base',
        component: () => import('@/views/tool/tool/tool_index.vue'),
        name: '工具管理',
        meta: {
          title: '工具管理',
          roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
        },
        children: [
          {
            path: '/tool/tool',
            component: () => import('@/views/tool/tool/tool.vue'),
            name: '工具台账',
            meta: {
              title: '工具台账',
              roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/tool/tool'
            }
          },
          {
            path: '/tool/tool/tool_add',
            component: () => import('@/views/tool/tool/tool_add.vue'),
            name: '新增工具',
            hidden: true,
            meta: {
              title: '新增工具',
              roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/tool/tool'
            }
          },
          {
            path: '/tool/tool/tool_edit/:id',
            component: () => import('@/views/tool/tool/tool_edit.vue'),
            name: '更新工具',
            hidden: true,
            meta: {
              title: '更新工具',
              roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/tool/tool'
            }
          }
        ]
      },
      {
        path: '/tool/procurement_base',
        component: () => import('@/views/tool/apply/apply_index.vue'),
        meta: {
          title: '工具采购',
          roles: [16, 112, 113, 116, 128]
        },
        name: '工具采购',
        children: [
          {
            path: '/tool/apply',
            component: () => import('@/views/tool/apply/apply.vue'),
            hidden: true,
            name: '工具采购申请',
            meta: {
              title: '工具采购申请',
              roles: [16]
            }
          },
          {
            path: '/tool/apply/apply_add',
            name: '增加工具采购申请',
            hidden: true,
            meta: {
              title: '增加工具采购申请',
              roles: [16]
            },
            component: () => import('@/views/tool/apply/apply_add.vue')
          },
          {
            path: '/tool/apply/apply_edit/:id',
            name: '更新工具采购申请',
            hidden: true,
            meta: {
              title: '更新工具采购申请',
              roles: [16]
            },
            component: () => import('@/views/tool/apply/apply_edit.vue')
          },
          {
            path: '/tool/order',
            component: () => import('@/views/tool/order/order.vue'),
            name: 'tool_order',
            meta: {
              title: '采购订单',
              roles: [16, 112, 113, 116, 117, 124, 128],
              activeMenu: '/tool/order'
            }
          },
          {
            path: '/tool/order/order_add',
            name: '增加工具采购订单',
            hidden: true,
            meta: {
              title: '增加工具采购订单',
              roles: [16, 112, 113, 116, 117, 124, 128],
              activeMenu: '/tool/order'
            },
            component: () => import('@/views/tool/order/order_add.vue')
          },
          {
            path: '/tool/order/order_edit/:id',
            name: '更新工具采购订单',
            hidden: true,
            meta: {
              title: '更新备件采购订单',
              roles: [16, 112, 113, 116, 117, 124, 128],
              activeMenu: '/tool/order'
            },
            component: () => import('@/views/tool/order/order_edit.vue')
          }
        ]
      },
      {
        path: '/tool/enter_base',
        component: () => import('@/views/tool/enter/enter_index.vue'),
        name: '工具入库管理',
        meta: {
          title: '入库管理',
          roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
        },
        children: [
          {
            path: '/tool/enter',
            component: () => import('@/views/tool/enter/enter.vue'),
            name: '工具收货入库',
            meta: {
              title: '收货入库',
              roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/tool/enter'
            }
          },
          {
            path: '/tool/enter/enter_add',
            component: () => import('@/views/tool/enter/enter_add.vue'),
            name: '新增工具入库单',
            hidden: true,
            meta: {
              title: '新增入库单',
              roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/tool/enter'
            }
          },
          {
            path: '/tool/enter/enter_edit/:id',
            component: () => import('@/views/tool/enter/enter_edit.vue'),
            name: '更新工具入库单',
            hidden: true,
            meta: {
              title: '更新入库单',
              roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/tool/enter'
            }
          }
        ]
      },
      {
        path: '/tool/appear_base',
        component: () => import('@/views/tool/appear/appear_index.vue'),
        name: '工具出库管理',
        meta: {
          title: '出库管理',
          roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
        },
        children: [
          {
            path: '/tool/appear',
            component: () => import('@/views/tool/appear/appear.vue'),
            name: '工具出库',
            meta: {
              title: '工具出库',
              roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/tool/appear'
            }
          },
          {
            path: '/tool/appear/appear_add',
            component: () => import('@/views/tool/appear/appear_add.vue'),
            name: '新增工具出库单',
            hidden: true,
            meta: {
              title: '新增出库单',
              roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/tool/appear'
            }
          },
          {
            path: '/tool/appear/appear_edit/:id',
            component: () => import('@/views/tool/appear/appear_edit.vue'),
            name: '更新工具出库单',
            hidden: true,
            meta: {
              title: '更新出库单',
              roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/tool/appear'
            }
          }
        ]
      },
      {
        path: '/tool/back_base',
        component: () => import('@/views/tool/back/back_index.vue'),
        name: '归还管理',
        meta: {
          title: '归还管理',
          roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100]
        },
        children: [
          {
            path: '/tool/back',
            component: () => import('@/views/tool/back/back.vue'),
            name: '工具归还',
            meta: {
              title: '工具归还',
              roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/tool/back'
            }
          },
          {
            path: '/tool/back/back_add',
            component: () => import('@/views/tool/back/back_add.vue'),
            name: '新增工具归还单',
            hidden: true,
            meta: {
              title: '新增归还单',
              roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/tool/back'
            }
          },
          {
            path: '/tool/back/back_edit/:id',
            component: () => import('@/views/tool/back/back_edit.vue'),
            name: '更新工具归还单',
            hidden: true,
            meta: {
              title: '更新归还单',
              roles: [16, 128, 124, 112, 113, 116, 117, 118, 95, 96, 97, 98, 99, 125, 119, 120, 121, 100],
              activeMenu: '/tool/back'
            }
          }
        ]
      },
      {
        path: '/tool/repair_base',
        component: () => import('@/views/tool/repair/repair_index.vue'),
        name: '维修管理',
        meta: {
          title: '维修管理',
          roles: [16]
        },
        children: [
          {
            path: '/tool/repair',
            component: () => import('@/views/tool/repair/repair.vue'),
            name: '工具维修',
            meta: {
              title: '工具维修',
              roles: [16],
              activeMenu: '/tool/repair'
            }
          },
          {
            path: '/tool/repair/repair_add',
            component: () => import('@/views/tool/repair/repair_add.vue'),
            name: '新增工具维修单',
            hidden: true,
            meta: {
              title: '新增维修单',
              roles: [16],
              activeMenu: '/tool/repair'
            }
          },
          {
            path: '/tool/repair/repair_edit/:id',
            component: () => import('@/views/tool/repair/repair_edit.vue'),
            name: '更新工具维修单',
            hidden: true,
            meta: {
              title: '更新维修单',
              roles: [16],
              activeMenu: '/tool/repair'
            }
          }
        ]
      },
      {
        path: '/tool/take_base',
        component: () => import('@/views/tool/take/take_index.vue'),
        name: '工具盘点管理',
        meta: {
          title: '工具管理',
          roles: [16, 112, 113, 116, 117, 118]
        },
        children: [
          {
            path: '/tool/take',
            component: () => import('@/views/tool/take/take.vue'),
            name: '工具盘点',
            meta: {
              title: '工具盘点',
              roles: [16, 112, 113, 116, 117, 118],
              activeMenu: '/tool/take'
            }
          },
          {
            path: '/tool/take/take_add',
            component: () => import('@/views/tool/take/take_add.vue'),
            name: '新增工具盘点单',
            hidden: true,
            meta: {
              title: '新增盘点单',
              roles: [16, 112, 113, 116, 117, 118],
              activeMenu: '/tool/take'
            }
          },
          {
            path: '/tool/take/take_edit/:id',
            component: () => import('@/views/tool/take/take_edit.vue'),
            name: '更新工具盘点单',
            hidden: true,
            meta: {
              title: '更新盘点单',
              roles: [16, 112, 113, 116, 117, 118],
              activeMenu: '/tool/take'
            }
          }
        ]
      },
      {
        path: '/tool/category_base',
        component: () => import('@/views/tool/category/category_index.vue'),
        hidden: true,
        name: '工具分类管理',
        meta: {
          title: '分类管理',
          roles: [16]
        },
        children: [
          {
            path: '/tool/category',
            component: () => import('@/views/tool/category/category.vue'),
            name: '工具分类',
            meta: {
              title: '工具分类',
              roles: [16]
            }
          },
          {
            path: '/tool/category/category_add',
            component: () => import('@/views/tool/category/category_add.vue'),
            name: '新增工具分类',
            hidden: true,
            meta: {
              title: '新增分类',
              roles: [16]
            }
          },
          {
            path: '/tool/category/category_edit/:id',
            component: () => import('@/views/tool/category/category_edit.vue'),
            name: '更新工具分类',
            hidden: true,
            meta: {
              title: '更新分类',
              roles: [16]
            }
          }
        ]
      }
    ]
  },
  {
    path: '/project',
    component: Layout,
    redirect: 'noRedirect',
    name: 'project',
    meta: {
      title: '维护管理',
      icon: 'iconfont icon-houtaiweihu',
      roles: [16]
    },
    children: [
      {
        path: '/project/plan_base',
        component: () => import('@/views/project/plan1/plan_index'),
        meta: {
          title: '维护计划',
          roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 114, 119, 120, 121, 124, 125, 128]
        },
        name: '维护计划',
        children: [
          {
            path: '/project/plan1',
            component: () => import('@/views/project/plan1/plan.vue'),
            name: '自主点检',
            meta: {
              title: '自主点检',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/tool/plan1'
            }
          },
          {
            path: '/project/plan1/plan_add',
            name: '新增自主点检',
            hidden: true,
            meta: {
              title: '新增自主点检',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/tool/plan1'
            },
            component: () => import('@/views/project/plan1/plan_add.vue')
          },
          {
            path: '/project/plan1/plan_edit/:id',
            name: '更新自主点检计划',
            hidden: true,
            meta: {
              title: '更新自主点检计划',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/tool/plan1'
            },
            component: () => import('@/views/project/plan1/plan_edit.vue')
          },
          {
            path: '/project/plan5',
            component: () => import('@/views/project/plan5/plan.vue'),
            name: '专业点检',
            meta: {
              title: '专业点检',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/tool/plan5'
            }
          },
          {
            path: '/project/plan5/plan_add',
            name: '新增专业点检',
            hidden: true,
            meta: {
              title: '新增专业点检',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/tool/plan5'
            },
            component: () => import('@/views/project/plan5/plan_add.vue')
          },
          {
            path: '/project/plan5/plan_edit/:id',
            name: '更新专业点检计划',
            hidden: true,
            meta: {
              title: '更新专业点检计划',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/tool/plan5'
            },
            component: () => import('@/views/project/plan5/plan_edit.vue')
          },
          {
            path: '/project/plan2',
            component: () => import('@/views/project/plan2/plan.vue'),
            name: '自主维护',
            meta: {
              title: '自主维护',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/tool/plan2'
            }
          },
          {
            path: '/project/plan2/plan_add',
            name: '新增自主维护',
            hidden: true,
            meta: {
              title: '新增自主维护',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/tool/plan2'
            },
            component: () => import('@/views/project/plan2/plan_add.vue')
          },
          {
            path: '/project/plan2/plan_edit/:id',
            name: '更新自主维护',
            hidden: true,
            meta: {
              title: '更新自主维护',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/tool/plan2'
            },
            component: () => import('@/views/project/plan2/plan_edit.vue')
          },
          {
            path: '/project/plan3',
            component: () => import('@/views/project/plan3/plan.vue'),
            name: '专业维护',
            meta: {
              title: '专业维护',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/tool/plan3'
            }
          },
          {
            path: '/project/plan3/plan_add',
            name: '新增专业维护',
            hidden: true,
            meta: {
              title: '新增专业维护',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/tool/plan3'
            },
            component: () => import('@/views/project/plan3/plan_add.vue')
          },
          {
            path: '/project/plan3/plan_edit/:id',
            name: '更新专业维护',
            hidden: true,
            meta: {
              title: '更新专业维护',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/tool/plan3'
            },
            component: () => import('@/views/project/plan3/plan_edit.vue')
          },
          {
            path: '/project/plan4',
            component: () => import('@/views/project/plan4/plan.vue'),
            name: '润滑',
            meta: {
              title: '润滑管理',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/tool/plan4'
            }
          },
          {
            path: '/project/plan4/plan_add',
            name: '新增润滑',
            hidden: true,
            meta: {
              title: '新增润滑',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/tool/plan4'
            },
            component: () => import('@/views/project/plan4/plan_add.vue')
          },
          {
            path: '/project/plan4/plan_edit/:id',
            name: '更新润滑',
            hidden: true,
            meta: {
              title: '更新润滑',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/tool/plan4'
            },
            component: () => import('@/views/project/plan4/plan_edit.vue')
          }
        ]
      },
      {
        path: '/project/approve_base',
        component: () => import('@/views/project/approve/approve_index.vue'),
        name: '计划审批管理',
        hidden: true,
        meta: {
          title: '计划审批管理',
          roles: [16]
        },
        children: [
          {
            path: '/project/approve',
            component: () => import('@/views/project/approve/approve.vue'),
            name: '计划审批',
            meta: {
              title: '计划审批',
              roles: [16]
            }
          },
          {
            path: '/project/approve/approve_add',
            component: () => import('@/views/project/approve/approve_add.vue'),
            name: '新增计划审批',
            hidden: true,
            meta: {
              title: '新增计划审批',
              roles: [16]
            }
          },
          {
            path: '/project/approve/approve_edit/:id',
            component: () => import('@/views/project/approve/approve_edit.vue'),
            name: '更新计划审批',
            hidden: true,
            meta: {
              title: '更新计划审批',
              roles: [16]
            }
          }
        ]
      },
      {
        path: '/project/task_base',
        component: () => import('@/views/project/task/task_index.vue'),
        name: '任务',
        meta: {
          title: '任务',
          roles: [16]
        },
        children: [
          {
            path: '/project/task',
            component: () => import('@/views/project/task/task.vue'),
            name: '任务管理',
            meta: {
              title: '任务管理',
              roles: [16],
              activeMenu: '/project/task'
            }
          },
          {
            path: '/project/task/task_add',
            component: () => import('@/views/project/task/task_add.vue'),
            name: '新增任务',
            hidden: true,
            meta: {
              title: '新增任务',
              roles: [16],
              activeMenu: '/project/task'
            }
          },
          {
            path: '/project/task/task_edit/:id',
            component: () => import('@/views/project/task/task_edit.vue'),
            name: '更新任务',
            hidden: true,
            meta: {
              title: '更新任务',
              roles: [16],
              activeMenu: '/project/task'
            }
          }
        ]
      },
      {
        path: '/project/apply_base',
        component: () => import('@/views/project/apply/apply_index.vue'),
        name: '申请保修管理',
        meta: {
          title: '申请保修管理',
          roles: [16]
        },
        children: [
          {
            path: '/project/apply',
            component: () => import('@/views/project/apply/apply.vue'),
            name: 'apply',
            meta: {
              title: '故障报修',
              roles: [16],
              activeMenu: '/project/apply'
            }
          },
          {
            path: '/project/apply/apply_add',
            component: () => import('@/views/project/apply/apply_add.vue'),
            name: '新增报修单',
            hidden: true,
            meta: {
              title: '新增报修单',
              roles: [16],
              activeMenu: '/project/apply'
            }
          },
          {
            path: '/project/apply/apply_edit/:id',
            component: () => import('@/views/project/apply/apply_edit.vue'),
            name: '更新报修单',
            hidden: true,
            meta: {
              title: '更新报修单',
              roles: [16],
              activeMenu: '/project/apply'
            }
          }
        ]
      },
      {
        path: '/project/group_base',
        component: () => import('@/views/project/group/group_index.vue'),
        name: '任务组管理',
        hidden: true,
        meta: {
          title: '任务组管理',
          roles: [16]
        },
        children: [
          {
            path: '/project/group',
            component: () => import('@/views/project/group/group.vue'),
            name: '任务组',
            meta: {
              title: '任务组',
              roles: [16]
            }
          },
          {
            path: '/project/group/group_add',
            component: () => import('@/views/project/group/group_add.vue'),
            name: '新增任务组',
            hidden: true,
            meta: {
              title: '新增任务组',
              roles: [16]
            }
          },
          {
            path: '/project/group/group_edit/:id',
            component: () => import('@/views/project/group/group_edit.vue'),
            name: '更新任务组',
            hidden: true,
            meta: {
              title: '更新任务组',
              roles: [16]
            }
          }
        ]
      },
      {
        path: '/project/task_base1',
        component: () => import('@/views/project1/task/task_index.vue'),
        name: '方法',
        meta: {
          title: '方法',
          roles: [16]
        },
        children: [
          {
            path: '/project1/task',
            component: () => import('@/views/project1/task/task.vue'),
            name: '方法管理',
            meta: {
              title: '方法管理',
              roles: [16],
              activeMenu: '/project1/task'
            }
          },
          {
            path: '/project1/task/task_add',
            component: () => import('@/views/project1/task/detail.vue'),
            name: '新增方法',
            hidden: true,
            meta: {
              title: '新增方法',
              roles: [16],
              activeMenu: '/project1/task'
            }
          },
          {
            path: '/project1/task/task_edit/:id',
            component: () => import('@/views/project1/task/detail.vue'),
            name: '更新方法',
            hidden: true,
            meta: {
              title: '更新方法',
              roles: [16],
              activeMenu: '/project1/task'
            }
          }
        ]
      },
      {
        path: '/project1/plan_base',
        component: () => import('@/views/project1/plan/plan_index'),
        meta: {
          title: '维护计划（新）',
          roles: [16]
        },
        name: '维护计划（新）',
        children: [
          {
            path: '/project1/plan1',
            component: () => import('@/views/project1/plan'),
            name: '自主点检1',
            meta: {
              title: '自主点检1',
              roles: [16],
              activeMenu: '/project1/plan1'
            }
          },
          {
            path: '/project1/plan1/plan_add',
            name: '新增自主点检1',
            hidden: true,
            meta: {
              title: '新增自主点检1',
              roles: [16],
              activeMenu: '/project1/plan1'
            },
            component: () => import('@/views/project1/plan/detail')
          },
          {
            path: '/project1/plan1/plan_edit/:id',
            name: '更新自主点检计划1',
            hidden: true,
            meta: {
              title: '更新自主点检计划1',
              roles: [16],
              activeMenu: '/project1/plan1'
            },
            component: () => import('@/views/project1/plan/detail')
          },
          {
            path: '/project1/plan5',
            component: () => import('@/views/project1/plan'),
            name: '专业点检1',
            meta: {
              title: '专业点检1',
              roles: [16],
              activeMenu: '/project1/plan5'
            }
          },
          {
            path: '/project1/plan5/plan_add',
            name: '新增专业点检1',
            hidden: true,
            meta: {
              title: '新增专业点检1',
              roles: [16],
              activeMenu: '/project1/plan5'
            },
            component: () => import('@/views/project1/plan/detail')
          },
          {
            path: '/project1/plan5/plan_edit/:id',
            name: '更新专业点检计划1',
            hidden: true,
            meta: {
              title: '更新专业点检计划1',
              roles: [16],
              activeMenu: '/project1/plan5'
            },
            component: () => import('@/views/project1/plan/detail')
          },
          {
            path: '/project1/plan2',
            component: () => import('@/views/project1/plan'),
            name: '自主维护1',
            meta: {
              title: '自主维护1',
              roles: [16],
              activeMenu: '/project1/plan2'
            }
          },
          {
            path: '/project1/plan2/plan_add',
            name: '新增自主维护1',
            hidden: true,
            meta: {
              title: '新增自主维护1',
              roles: [16],
              activeMenu: '/project1/plan2'
            },
            component: () => import('@/views/project1/plan/detail')
          },
          {
            path: '/project1/plan2/plan_edit/:id',
            name: '更新自主维护1',
            hidden: true,
            meta: {
              title: '更新自主维护1',
              roles: [16],
              activeMenu: '/project1/plan2'
            },
            component: () => import('@/views/project1/plan/detail')
          },
          {
            path: '/project1/plan3',
            component: () => import('@/views/project1/plan'),
            name: '专业维护1',
            meta: {
              title: '专业维护1',
              roles: [16],
              activeMenu: '/project1/plan3'
            }
          },
          {
            path: '/project1/plan3/plan_add',
            name: '新增专业维护1',
            hidden: true,
            meta: {
              title: '新增专业维护1',
              roles: [16],
              activeMenu: '/project1/plan3'
            },
            component: () => import('@/views/project1/plan/detail')
          },
          {
            path: '/project1/plan3/plan_edit/:id',
            name: '更新专业维护1',
            hidden: true,
            meta: {
              title: '更新专业维护1',
              roles: [16],
              activeMenu: '/project1/plan3'
            },
            component: () => import('@/views/project1/plan/detail')
          },
          {
            path: '/project1/plan4',
            component: () => import('@/views/project1/plan'),
            name: '润滑1',
            meta: {
              title: '润滑管理1',
              roles: [16],
              activeMenu: '/project1/plan4'
            }
          },
          {
            path: '/project1/plan4/plan_add',
            name: '新增润滑1',
            hidden: true,
            meta: {
              title: '新增润滑1',
              roles: [16],
              activeMenu: '/project1/plan4'
            },
            component: () => import('@/views/project1/plan/detail')
          },
          {
            path: '/project1/plan4/plan_edit/:id',
            name: '更新润滑1',
            hidden: true,
            meta: {
              title: '更新润滑1',
              roles: [16],
              activeMenu: '/project1/plan4'
            },
            component: () => import('@/views/project1/plan/detail')
          },
          {
            path: '/project1/plan6',
            component: () => import('@/views/project1/plan'),
            name: '巡检1',
            meta: {
              title: '专业巡检1',
              roles: [16],
              activeMenu: '/project1/plan6'
            }
          },
          {
            path: '/project1/plan6/plan_add',
            name: '新增巡检1',
            hidden: true,
            meta: {
              title: '新增润滑1',
              roles: [16],
              activeMenu: '/project1/plan6'
            },
            component: () => import('@/views/project1/plan/detail')
          },
          {
            path: '/project1/plan6/plan_edit/:id',
            name: '更新巡检1',
            hidden: true,
            meta: {
              title: '更新润滑1',
              roles: [16],
              activeMenu: '/project1/plan6'
            },
            component: () => import('@/views/project1/plan/detail')
          }
        ]
      }
    ]
  },
  {
    path: '/maintain',
    component: Layout,
    redirect: 'noRedirect',
    name: 'maintain',
    meta: {
      title: '工单管理',
      icon: 'iconfont icon-crew_worksheet',
      roles: [16]
    },
    children: [
      {
        path: '/maintain/pm_base',
        component: () => import('@/views/maintain/pm/pm_index.vue'),
        name: '计划性维护',
        meta: {
          title: '计划性维护',
          roles: [16]
        },
        children: [
          {
            path: '/maintain/pm1',
            component: () => import('@/views/maintain/pm1/pm'),
            name: 'pm1',
            meta: {
              title: '自主点检',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/maintain/pm1'
            }
          },
          {
            path: '/maintain/pm1_add',
            name: 'pm1_add',
            hidden: true,
            meta: {
              title: '新增自主点检工单',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/maintain/pm1'
            },
            component: () => import('@/views/maintain/pm1/add')
          },
          {
            path: '/maintain/pm1_edit/:id',
            name: 'pm1_edit',
            hidden: true,
            meta: {
              title: '更新自主点检工单',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/maintain/pm1'
            },
            component: () => import('@/views/maintain/pm1/edit')
          },
          {
            path: '/maintain/pm5',
            component: () => import('@/views/maintain/pm5/pm'),
            name: 'pm5',
            meta: {
              title: '专业点检',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/maintain/pm5'
            }
          },
          {
            path: '/maintain/pm5_add',
            name: 'pm5_add',
            hidden: true,
            meta: {
              title: '新增专业点检工单',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/maintain/pm5'
            },
            component: () => import('@/views/maintain/pm5/add')
          },
          {
            path: '/maintain/pm5_edit/:id',
            name: 'pm5_edit',
            hidden: true,
            meta: {
              title: '更新专业点检工单',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/maintain/pm5'
            },
            component: () => import('@/views/maintain/pm5/edit')
          },
          {
            path: '/maintain/pm2',
            component: () => import('@/views/maintain/pm2/pm'),
            name: 'pm2',
            meta: {
              title: '自主维护',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/maintain/pm2'
            }
          },
          {
            path: '/maintain/pm2_add',
            name: 'pm2_add',
            hidden: true,
            meta: {
              title: '新增自主维护',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/maintain/pm2'
            },
            component: () => import('@/views/maintain/pm2/add')
          },
          {
            path: '/maintain/pm2_edit/:id',
            name: 'pm2_edit',
            hidden: true,
            meta: {
              title: '自主维护详情',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/maintain/pm2'
            },
            component: () => import('@/views/maintain/pm2/edit')
          },
          {
            path: '/maintain/pm3',
            component: () => import('@/views/maintain/pm3/pm'),
            name: 'pm3',
            meta: {
              title: '专业维护',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/maintain/pm3'
            }
          },
          {
            path: '/maintain/pm3_add',
            name: 'pm3_add',
            hidden: true,
            meta: {
              title: '新增专业维护',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/maintain/pm3'
            },
            component: () => import('@/views/maintain/pm3/add')
          },
          {
            path: '/maintain/pm3_edit/:id',
            name: 'pm3_edit',
            hidden: true,
            meta: {
              title: '更新专业维护',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/maintain/pm3'
            },
            component: () => import('@/views/maintain/pm3/edit')
          },
          {
            path: '/maintain/pm4',
            component: () => import('@/views/maintain/pm4/pm'),
            name: 'pm4',
            meta: {
              title: '润滑管理',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/maintain/pm4'
            }
          },
          {
            path: '/maintain/pm4_add',
            name: 'pm4_add',
            hidden: true,
            meta: {
              title: '新增润滑',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/maintain/pm4'
            },
            component: () => import('@/views/maintain/pm4/add')
          },
          {
            path: '/maintain/pm4_edit/:id',
            name: 'pm4_edit',
            hidden: true,
            meta: {
              title: '更新润滑',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/maintain/pm4'
            },
            component: () => import('@/views/maintain/pm4/edit')
          }
        ]
      },
      {
        path: '/maintain/cm_base',
        component: () => import('@/views/maintain/cm/cm_index.vue'),
        name: '报修管理',
        meta: {
          title: '报修管理',
          roles: [16]
        },
        children: [
          {
            path: '/maintain/cm',
            component: () => import('@/views/maintain/cm/cm.vue'),
            name: '故障报修',
            meta: {
              title: '故障报修',
              roles: [16],
              activeMenu: '/maintain/cm'
            }
          },
          {
            path: '/maintain/cm/cm_add',
            component: () => import('@/views/maintain/cm/cm_add.vue'),
            name: '新增报修',
            hidden: true,
            meta: {
              title: '新增报修',
              roles: [16],
              activeMenu: '/maintain/cm'
            }
          },
          {
            path: '/maintain/cm/cm_edit/:id',
            component: () => import('@/views/maintain/cm/cm_edit.vue'),
            name: '更新报修',
            hidden: true,
            meta: {
              title: '更新报修',
              roles: [16],
              activeMenu: '/maintain/cm'
            }
          }
        ]
      },
      {
        path: '/maintain/out_base',
        component: () => import('@/views/maintain/out/out_index.vue'),
        name: '委外管理',
        meta: {
          title: '委外管理',
          roles: [16]
        },
        children: [
          {
            path: '/maintain/out',
            component: () => import('@/views/maintain/out/out.vue'),
            name: '委外工单',
            meta: {
              title: '委外工单',
              roles: [16],
              activeMenu: '/maintain/out'
            }
          },
          {
            path: '/maintain/out/out_add',
            component: () => import('@/views/maintain/out/out_add.vue'),
            name: '新增委外',
            hidden: true,
            meta: {
              title: '新增委外',
              roles: [16],
              activeMenu: '/maintain/out'
            }
          },
          {
            path: '/maintain/out/out_edit/:id',
            component: () => import('@/views/maintain/out/out_edit.vue'),
            name: '更新委外',
            hidden: true,
            meta: {
              title: '更新委外',
              roles: [16],
              activeMenu: '/maintain/out'
            }
          }
        ]
      },
      {
        path: '/maintain/file_base',
        component: () => import('@/views/maintain/file/file_index.vue'),
        name: '归档',
        meta: {
          title: '工单归档',
          roles: [16]
        },
        children: [
          {
            path: '/maintain/file_pm1',
            component: () => import('@/views/maintain/file1/pm'),
            name: 'file_pm1',
            meta: {
              title: '自主点检',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            }
          },
          {
            path: '/maintain/file_pm1_edit/:id',
            name: 'file_pm1_edit',
            hidden: true,
            meta: {
              title: '查看自主点检工单（归档）',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            },
            component: () => import('@/views/maintain/file1/edit')
          },
          {
            path: '/maintain/file_pm5',
            component: () => import('@/views/maintain/file5/pm'),
            name: 'file_pm5',
            meta: {
              title: '专业点检',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            }
          },
          {
            path: '/maintain/file_pm5_edit/:id',
            name: 'file_pm5_edit',
            hidden: true,
            meta: {
              title: '查看专业点检工单（归档）',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            },
            component: () => import('@/views/maintain/file5/edit')
          },
          {
            path: '/maintain/file_pm2',
            component: () => import('@/views/maintain/file2/pm'),
            name: 'file_pm2',
            meta: {
              title: '自主维护',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            }
          },
          {
            path: '/maintain/file_pm2_edit/:id',
            name: 'file_pm2_edit',
            hidden: true,
            meta: {
              title: '查看自主维护工单（归档）',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            },
            component: () => import('@/views/maintain/file2/edit')
          },
          {
            path: '/maintain/file_pm3',
            component: () => import('@/views/maintain/file3/pm'),
            name: 'file_pm3',
            meta: {
              title: '专业维护',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            }
          },
          {
            path: '/maintain/file_pm3_edit/:id',
            name: 'file_pm3_edit',
            hidden: true,
            meta: {
              title: '查看专业维护工单（归档）',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            },
            component: () => import('@/views/maintain/file3/edit')
          },
          {
            path: '/maintain/file_pm4',
            component: () => import('@/views/maintain/file4/pm'),
            name: 'file_pm4',
            meta: {
              title: '润滑管理',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            }
          },
          {
            path: '/maintain/file_pm4_edit/:id',
            name: 'file_pm4_edit',
            hidden: true,
            meta: {
              title: '查看润滑工单（归档）',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            },
            component: () => import('@/views/maintain/file4/edit')
          },
          {
            path: '/maintain/file_cm',
            component: () => import('@/views/maintain/file_cm/cm'),
            name: 'file_cm',
            meta: {
              title: '报修单',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            }
          },
          {
            path: '/maintain/file_cm_edit/:id',
            name: 'file_cm_edit',
            hidden: true,
            meta: {
              title: '查看报修单工单（归档）',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            },
            component: () => import('@/views/maintain/file_cm/cm_edit')
          },
          {
            path: '/maintain/file_out',
            component: () => import('@/views/maintain/file_out/out'),
            name: 'file_out',
            meta: {
              title: '委外工单',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            }
          },
          {
            path: '/maintain/file_out_edit/:id',
            name: 'file_out_edit',
            hidden: true,
            meta: {
              title: '查看委外工单（归档）',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125]
            },
            component: () => import('@/views/maintain/file_out/out_edit')
          }
        ]
      }
    ]
  },
  {
    path: '/workorder',
    component: Layout,
    redirect: 'noRedirect',
    name: 'workorder',
    meta: {
      title: '工单管理(新)',
      icon: 'iconfont icon-crew_worksheet',
      roles: [16]
    },
    children: [
      {
        path: '/workorder/workorder_base',
        component: () => import('@/views/workorder/workorder_index'),
        name: 'workorder-pm',
        meta: {
          title: '计划性维护',
          roles: [16]
        },
        children: [
          {
            path: '/workorder/pm1',
            component: () => import('@/views/workorder/pm'),
            name: '计划性维护-自主点检',
            meta: {
              title: '自主点检',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/workorder/pm1'
            }
          },
          {
            path: '/workorder/pm1_edit/:id',
            name: '计划性维护-更新自主点检工单',
            hidden: true,
            meta: {
              title: '更新自主点检工单',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/workorder/pm1'
            },
            component: () => import('@/views/workorder/pm/detail')
          },
          {
            path: '/workorder/pm5',
            component: () => import('@/views/workorder/pm'),
            name: '计划性维护-专业点检',
            meta: {
              title: '专业点检',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/workorder/pm5'
            }
          },
          {
            path: '/workorder/pm5_edit/:id',
            name: '计划性维护-更新专业点检工单',
            hidden: true,
            meta: {
              title: '更新专业点检工单',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/workorder/pm5'
            },
            component: () => import('@/views/workorder/pm/detail')
          },
          {
            path: '/workorder/pm2',
            component: () => import('@/views/workorder/pm'),
            name: '计划性维护-自主维护',
            meta: {
              title: '自主维护',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/workorder/pm2'
            }
          },
          {
            path: '/workorder/pm2_edit/:id',
            name: '计划性维护-自主维护详情',
            hidden: true,
            meta: {
              title: '自主维护详情',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/workorder/pm2'
            },
            component: () => import('@/views/workorder/pm/detail')
          },
          {
            path: '/workorder/pm3',
            component: () => import('@/views/workorder/pm'),
            name: '计划性维护-专业维护',
            meta: {
              title: '专业维护',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/workorder/pm3'
            }
          },
          {
            path: '/workorder/pm3_edit/:id',
            name: '计划性维护-更新专业维护',
            hidden: true,
            meta: {
              title: '更新专业维护',
              roles: [16, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 113, 119, 120, 121, 124, 125],
              activeMenu: '/workorder/pm3'
            },
            component: () => import('@/views/workorder/pm/detail')
          },
          {
            path: '/workorder/pm4',
            component: () => import('@/views/workorder/pm'),
            name: '计划性维护-润滑管理',
            meta: {
              title: '润滑管理',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/workorder/pm4'
            }
          },
          {
            path: '/workorder/pm4_edit/:id',
            name: '计划性维护-更新润滑',
            hidden: true,
            meta: {
              title: '更新润滑',
              roles: [16, 112, 113, 114, 128],
              activeMenu: '/workorder/pm4'
            },
            component: () => import('@/views/workorder/pm/detail')
          }
        ]
      }
    ]
  },
  {
    path: '/procurement',
    component: Layout,
    redirect: 'noRedirect',
    name: 'procurement',
    hidden: true,
    meta: {
      title: '采购管理',
      icon: 'documentation',
      roles: [16, 112, 113]
    },
    children: [
      {
        path: '/procurement/applyfor_base',
        component: () => import('@/views/procurement/applyfor/applyfor_index.vue'),
        name: '采购申请管理',
        meta: {
          title: '采购申请管理',
          roles: [16, 112, 113]
        },
        children: [
          {
            path: '/procurement/applyfor',
            component: () => import('@/views/procurement/applyfor/applyfor.vue'),
            name: '采购申请',
            meta: {
              title: '采购申请',
              roles: [16, 112, 113]
            }
          },
          {
            path: '/procurement/applyfor/applyfor_add',
            component: () => import('@/views/procurement/applyfor/applyfor_add.vue'),
            name: '提交申请',
            hidden: true,
            meta: {
              title: '提交申请',
              roles: [16, 112, 113]
            }
          },
          {
            path: '/procurement/applyfor/applyfor_edit/:id',
            component: () => import('@/views/procurement/applyfor/applyfor_edit.vue'),
            name: '更新采购申请',
            hidden: true,
            meta: {
              title: '更新采购申请',
              roles: [16, 112, 113]
            }
          }
        ]
      },
      {
        path: '/procurement/order_base',
        component: () => import('@/views/procurement/order/order_index.vue'),
        name: '订单管理',
        meta: {
          title: '订单管理',
          roles: [16, 112, 113]
        },
        children: [
          {
            path: '/procurement/order',
            component: () => import('@/views/procurement/order/order.vue'),
            name: '采购订单',
            meta: {
              title: '采购订单',
              roles: [16, 112, 113]
            }
          },
          {
            path: '/procurement/order/order_add',
            component: () => import('@/views/procurement/order/order_add.vue'),
            name: '提交订单',
            hidden: true,
            meta: {
              title: '提交订单',
              roles: [16, 112, 113]
            }
          },
          {
            path: '/procurement/order/order_edit/:id',
            component: () => import('@/views/procurement/order/order_edit.vue'),
            name: '更新订单',
            hidden: true,
            meta: {
              title: '更新订单',
              roles: [16, 112, 113]
            }
          }
        ]
      },
      {
        path: '/procurement/contract_base',
        component: () => import('@/views/procurement/contract/contract_index.vue'),
        name: '合同管理',
        meta: {
          title: '合同管理',
          roles: [16, 112, 113]
        },
        children: [
          {
            path: '/procurement/contract',
            component: () => import('@/views/procurement/contract/contract.vue'),
            name: '合同',
            meta: {
              title: '合同',
              roles: [16, 112, 113]
            }
          },
          {
            path: '/procurement/contract/contract_add',
            component: () => import('@/views/procurement/contract/contract_add.vue'),
            name: '新增合同',
            hidden: true,
            meta: {
              title: '新增合同',
              roles: [16, 112, 113]
            }
          },
          {
            path: '/procurement/contract/contract_edit/:id',
            component: () => import('@/views/procurement/contract/contract_edit.vue'),
            name: '更新合同',
            hidden: true,
            meta: {
              title: '更新合同',
              roles: [16, 112, 113]
            }
          }
        ]
      }
    ]
  },
  {
    path: '/personnel',
    component: Layout,
    redirect: 'noRedirect',
    name: 'personnel',
    meta: {
      title: '人员管理',
      icon: 'iconfont icon-renyuan',
      roles: [16, 128, 124, 112, 113, 114, 116, 95, 96, 97, 98, 99, 125, 100]
    },
    children: [
      {
        path: '/personnel/department_base',
        component: () => import('@/views/personnel/department/department_index.vue'),
        name: '人员部门',
        meta: {
          title: '人员部门',
          roles: [16]
        },
        hidden: true,
        children: [
          {
            path: '/personnel/department',
            component: () => import('@/views/personnel/department/department.vue'),
            name: '人员部门管理',
            meta: {
              title: '人员部门',
              roles: [16]
            }
          },
          {
            path: '/personnel/department/department_add',
            component: () => import('@/views/personnel/department/department_add.vue'),
            name: '新增人员部门',
            hidden: true,
            meta: {
              title: '新增人员部门',
              roles: [16]
            }
          },
          {
            path: '/personnel/department/department_edit/:id',
            component: () => import('@/views/personnel/department/department_edit.vue'),
            name: '更新人员部门',
            hidden: true,
            meta: {
              title: '更新人员部门',
              roles: [16]
            }
          }
        ]
      },
      {
        path: '/personnel/section_base',
        component: () => import('@/views/personnel/section/section_index.vue'),
        name: '人员科室',
        meta: {
          title: '人员科室',
          roles: [16]
        },
        hidden: true,
        children: [
          {
            path: '/personnel/section',
            component: () => import('@/views/personnel/section/section.vue'),
            name: '科室管理',
            meta: {
              title: '科室管理',
              roles: [16]
            }
          },
          {
            path: '/personnel/section/section_add',
            component: () => import('@/views/personnel/section/section_add.vue'),
            name: '新增科室',
            hidden: true,
            meta: {
              title: '新增科室',
              roles: [16]
            }
          },
          {
            path: '/personnel/section/section_edit/:id',
            component: () => import('@/views/personnel/section/section_edit.vue'),
            name: '更新科室',
            hidden: true,
            meta: {
              title: '更新科室',
              roles: [16]
            }
          }
        ]
      },
      {
        path: '/personnel/class_base',
        component: () => import('@/views/personnel/class/class_index.vue'),
        name: '人员班组',
        meta: {
          title: '人员班组',
          roles: [16]
        },
        hidden: true,
        children: [
          {
            path: '/personnel/class',
            component: () => import('@/views/personnel/class/class.vue'),
            name: '班组管理',
            meta: {
              title: '班组管理',
              roles: [16] // admin是16，一般是17
            }
          },
          {
            path: '/personnel/class/class_add',
            component: () => import('@/views/personnel/class/class_add.vue'),
            name: '新增班组',
            hidden: true,
            meta: {
              title: '新增班组',
              roles: [16]
            }
          },
          {
            path: '/personnel/class/class_edit/:id',
            component: () => import('@/views/personnel/class/class_edit.vue'),
            name: '更新班组',
            hidden: true,
            meta: {
              title: '更新班组',
              roles: [16]
            }
          }
        ]
      },
      {
        path: '/personnel/job_base',
        component: () => import('@/views/personnel/job/job_index.vue'),
        name: '人员岗位',
        meta: {
          title: '人员岗位',
          roles: [16]
        },
        hidden: true,
        children: [
          {
            path: '/personnel/job',
            component: () => import('@/views/personnel/job/job.vue'),
            name: '岗位管理',
            meta: {
              title: '岗位管理',
              roles: [16]
            }
          },
          {
            path: '/personnel/job/job_add',
            component: () => import('@/views/personnel/job/job_add.vue'),
            name: '新增岗位',
            hidden: true,
            meta: {
              title: '新增岗位',
              roles: [16]
            }
          },
          {
            path: '/personnel/job/job_edit/:id',
            component: () => import('@/views/personnel/job/job_edit.vue'),
            name: '更新岗位',
            hidden: true,
            meta: {
              title: '更新岗位',
              roles: [16]
            }
          }
        ]
      },
      {
        path: '/personnel/staff_base',
        component: () => import('@/views/personnel/staff/staff_index.vue'),
        name: '人员管理',
        meta: {
          title: '人员管理',
          roles: [16, 128, 124, 112, 113, 114, 116, 95, 96, 97, 98, 99, 125, 100]
        },
        children: [
          {
            path: '/personnel/staff',
            component: () => import('@/views/personnel/staff/staff.vue'),
            name: '员工管理',
            meta: {
              title: '员工管理',
              roles: [16, 128, 124, 112, 113, 114, 116, 95, 96, 97, 98, 99, 125, 100],
              activeMenu: '/personnel/staff'
            }
          },
          {
            path: '/personnel/staff/staff_add',
            component: () => import('@/views/personnel/staff/staff_add.vue'),
            name: '新增员工',
            hidden: true,
            meta: {
              title: '新增员工',
              roles: [16, 128, 124, 112, 113, 114, 116, 95, 96, 97, 98, 99, 125, 100],
              activeMenu: '/personnel/staff'
            }
          },
          {
            path: '/personnel/staff/staff_edit/:id',
            component: () => import('@/views/personnel/staff/staff_edit.vue'),
            name: '更新员工',
            hidden: true,
            meta: {
              title: '更新员工',
              roles: [16, 128, 124, 112, 113, 114, 116, 95, 96, 97, 98, 99, 125, 100],
              activeMenu: '/personnel/staff'
            }
          }
        ]
      }
    ]
  },
  {
    path: '/knowledge',
    component: Layout,
    redirect: 'noRedirect',
    name: 'knowledge',
    meta: {
      title: '知识管理',
      icon: 'icon font icon-xitong',
      roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 125, 122]
    },
    children: [
      {
        path: '/knowledge/knowledge_base',
        component: () => import('@/views/knowledge/knowledge/knowledge_index.vue'),
        name: '知识库',
        meta: {
          title: '知识库',
          roles: [16, 112, 113]
        },
        children: [
          {
            path: '/knowledge/knowledge',
            component: () => import('@/views/knowledge/knowledge/knowledge.vue'),
            name: '知识管理',
            meta: {
              title: '知识管理',
              roles: [16, 112, 113],
              activeMenu: '/knowledge/knowledge'
            }
          },
          {
            path: '/knowledge/knowledge/knowledge_add',
            component: () => import('@/views/knowledge/knowledge/knowledge_add.vue'),
            name: '新增知识库',
            hidden: true,
            meta: {
              title: '新增知识库',
              roles: [16, 112, 113],
              activeMenu: '/knowledge/knowledge'
            }
          },
          {
            path: '/knowledge/knowledge/knowledge_edit/:id',
            component: () => import('@/views/knowledge/knowledge/knowledge_edit.vue'),
            name: '更新知识库',
            hidden: true,
            meta: {
              title: '更新知识库',
              roles: [16, 112, 113],
              activeMenu: '/knowledge/knowledge'
            }
          }
        ]
      },
      {
        path: '/knowledge/category_base',
        component: () => import('@/views/knowledge/category/category_index.vue'),
        name: '知识分类',
        meta: {
          title: '知识分类',
          roles: [16, 112, 113]
        },
        children: [
          {
            path: '/knowledge/category',
            component: () => import('@/views/knowledge/category/category.vue'),
            name: '知识分类管理',
            meta: {
              title: '分类管理',
              roles: [16, 112, 113],
              activeMenu: '/knowledge/category'
            }
          },
          {
            path: '/knowledge/category/category_add',
            component: () => import('@/views/knowledge/category/category_add.vue'),
            name: '新增知识分类',
            hidden: true,
            meta: {
              title: '新增知识分类',
              roles: [16, 112, 113],
              activeMenu: '/knowledge/category'
            }
          },
          {
            path: '/knowledge/category/category_edit/:id',
            component: () => import('@/views/knowledge/category/category_edit.vue'),
            name: '更新知识分类',
            hidden: true,
            meta: {
              title: '更新知识分类',
              roles: [16, 112, 113],
              activeMenu: '/knowledge/category'
            }
          }
        ]
      }
    ]
  },
  {
    path: '/system',
    component: Layout,
    redirect: 'noRedirect',
    name: 'system',
    meta: {
      title: '系统管理',
      icon: 'icon font icon-xitong',
      roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 125, 122]
    },
    children: [
      {
        path: '/system/org_base',
        component: () => import('@/views/system/org/org_index.vue'),
        hidden: true,
        name: '系统组织',
        meta: {
          title: '系统组织',
          roles: [16, 112, 113]
        },
        children: [
          {
            path: '/system/org',
            component: () => import('@/views/system/org/org.vue'),
            name: '组织管理',
            meta: {
              title: '组织管理',
              roles: [16, 112, 113]
            }
          },
          {
            path: '/system/org/org_add',
            component: () => import('@/views/system/org/org_add.vue'),
            name: '新增组织',
            hidden: true,
            meta: {
              title: '新增组织',
              roles: [16, 112, 113]
            }
          },
          {
            path: '/system/org/org_edit/:id',
            component: () => import('@/views/system/org/org_edit.vue'),
            name: '更新组织',
            hidden: true,
            meta: {
              title: '更新组织',
              roles: [16, 112, 113]
            }
          }
        ]
      },
      {
        path: '/system/department_base',
        component: () => import('@/views/system/department/department_index.vue'),
        hidden: true,
        name: '系统部门',
        meta: {
          title: '系统部门',
          roles: [16]
        },
        children: [
          {
            path: '/system/department',
            component: () => import('@/views/system/department/department.vue'),
            name: '部门管理',
            meta: {
              title: '部门管理',
              roles: [16]
            }
          },
          {
            path: '/system/department/department_add',
            component: () => import('@/views/system/department/department_add.vue'),
            name: '新增部门',
            hidden: true,
            meta: {
              title: '新增部门',
              roles: [16]
            }
          },
          {
            path: '/system/department/department_edit/:id',
            component: () => import('@/views/system/department/department_edit.vue'),
            name: '更新部门',
            hidden: true,
            meta: {
              title: '更新部门',
              roles: [16]
            }
          }
        ]
      },
      {
        path: '/system/position_base',
        component: () => import('@/views/system/position/position_index.vue'),
        hidden: true,
        name: '系统位置',
        meta: {
          title: '系统位置',
          roles: [16]
        },
        children: [
          {
            path: '/system/position',
            component: () => import('@/views/system/position/position.vue'),
            name: '地理位置',
            meta: {
              title: '地理位置',
              roles: [16]
            }
          },
          {
            path: '/system/position/position_add',
            component: () => import('@/views/system/position/position_add.vue'),
            name: '新增位置',
            hidden: true,
            meta: {
              title: '新增位置',
              roles: [16]
            }
          },
          {
            path: '/system/position/position_edit/:id',
            component: () => import('@/views/system/position/position_edit.vue'),
            name: '更新位置',
            hidden: true,
            meta: {
              title: '更新位置',
              roles: [16]
            }
          }
        ]
      },
      {
        path: '/system/cost_base',
        component: () => import('@/views/system/cost/cost_index.vue'),
        name: '成本管理',
        meta: {
          title: '成本管理',
          roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 125, 119, 120, 121, 122]
        },
        children: [
          {
            path: '/system/cost',
            component: () => import('@/views/system/cost/cost.vue'),
            name: '成本中心',
            meta: {
              title: '成本中心',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 125, 119, 120, 121, 122],
              activeMenu: '/system/cost'
            }
          },
          {
            path: '/system/cost/cost_add',
            component: () => import('@/views/system/cost/cost_add.vue'),
            name: '新增成本',
            hidden: true,
            meta: {
              title: '新增成本',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 125, 119, 120, 121, 122],
              activeMenu: '/system/cost'
            }
          },
          {
            path: '/system/cost/cost_edit/:id',
            component: () => import('@/views/system/cost/cost_edit.vue'),
            name: '更新成本',
            hidden: true,
            meta: {
              title: '更新成本',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 125, 119, 120, 121, 122],
              activeMenu: '/system/cost'
            }
          }
        ]
      },
      {
        path: '/system/fault_base',
        component: () => import('@/views/system/fault/fault_index.vue'),
        name: '管理故障体系',
        meta: {
          title: '管理故障体系',
          roles: [16]
        },
        children: [
          {
            path: '/system/fault',
            component: () => import('@/views/system/fault/fault.vue'),
            name: '故障体系',
            meta: {
              title: '故障体系',
              roles: [16],
              activeMenu: '/system/fault'
            }
          },
          {
            path: '/system/fault/fault_add',
            component: () => import('@/views/system/fault/fault_add.vue'),
            name: '新增故障体系',
            hidden: true,
            meta: {
              title: '新增故障体系',
              roles: [16],
              activeMenu: '/system/fault'
            }
          },
          {
            path: '/system/fault/fault_edit/:id',
            component: () => import('@/views/system/fault/fault_edit.vue'),
            name: '更新故障体系',
            hidden: true,
            meta: {
              title: '更新故障体系',
              roles: [16],
              activeMenu: '/system/fault'
            }
          }
        ]
      },
      {
        path: '/system/provider_base',
        component: () => import('@/views/system/provider/provider_index.vue'),
        name: '供应商管理',
        meta: {
          title: '供应商管理',
          roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 125, 119, 120, 121]
        },
        children: [
          {
            path: '/system/provider',
            component: () => import('@/views/system/provider/provider.vue'),
            name: '供应商',
            meta: {
              title: '供应商',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 125, 119, 120, 121],
              activeMenu: '/system/provider'
            }
          },
          {
            path: '/system/provider/provider_add',
            component: () => import('@/views/system/provider/provider_add.vue'),
            name: '新增供应商',
            hidden: true,
            meta: {
              title: '新增供应商',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 125, 119, 120, 121],
              activeMenu: '/system/provider'
            }
          },
          {
            path: '/system/provider/provider_edit/:id',
            component: () => import('@/views/system/provider/provider_edit.vue'),
            name: '更新供应商',
            hidden: true,
            meta: {
              title: '更新供应商',
              roles: [16, 128, 124, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116, 125, 119, 120, 121],
              activeMenu: '/system/provider'
            }
          }
        ]
      },
      {
        path: '/system/store_base',
        component: () => import('@/views/system/store/store_index.vue'),
        name: '管理仓库',
        meta: {
          title: '管理仓库',
          roles: [16, 128, 124, 112, 113, 114, 115, 116, 117, 118, 125]
        },
        children: [
          {
            path: '/system/store',
            component: () => import('@/views/system/store/store.vue'),
            name: '仓库管理',
            meta: {
              title: '仓库管理',
              roles: [16, 128, 124, 112, 113, 114, 115, 116, 117, 118, 125],
              activeMenu: '/system/store'
            }
          },
          {
            path: '/system/store/store_add',
            component: () => import('@/views/system/store/store_add.vue'),
            name: '新增仓库',
            hidden: true,
            meta: {
              title: '新增仓库',
              roles: [16, 128, 124, 112, 113, 114, 115, 116, 117, 118, 125],
              activeMenu: '/system/store'
            }
          },
          {
            path: '/system/store/store_edit/:id',
            component: () => import('@/views/system/store/store_edit.vue'),
            name: '更新仓库',
            hidden: true,
            meta: {
              title: '更新仓库',
              roles: [16, 128, 124, 112, 113, 114, 115, 116, 117, 118, 125],
              activeMenu: '/system/store'
            }
          }
        ]
      },
      {
        path: '/system/location_base',
        component: () => import('@/views/system/location/location_index.vue'),
        name: '管理库位',
        meta: {
          title: '管理库位',
          roles: [16, 128, 124, 112, 113, 114, 115, 116, 117, 118, 125]
        },
        children: [
          {
            path: '/system/location',
            component: () => import('@/views/system/location/location.vue'),
            name: '库位管理',
            meta: {
              title: '库位管理',
              roles: [16, 128, 124, 112, 113, 114, 115, 116, 117, 118, 125],
              activeMenu: '/system/location'
            }
          },
          {
            path: '/system/location/location_add',
            component: () => import('@/views/system/location/location_add.vue'),
            name: '新增库位',
            hidden: true,
            meta: {
              title: '新增库位',
              roles: [16, 128, 124, 112, 113, 114, 115, 116, 117, 118, 125],
              activeMenu: '/system/location'
            }
          },
          {
            path: '/system/location/location_edit/:id',
            component: () => import('@/views/system/location/location_edit.vue'),
            name: '更新库位',
            hidden: true,
            meta: {
              title: '更新库位',
              roles: [16, 128, 124, 112, 113, 114, 115, 116, 117, 118, 125],
              activeMenu: '/system/location'
            }
          }
        ]
      },
      {
        path: '/system/document_base',
        component: () => import('@/views/system/document/document_index.vue'),
        hidden: true,
        name: '管理文档',
        meta: {
          title: '管理文档',
          roles: [16]
        },
        children: [
          {
            path: '/system/document',
            component: () => import('@/views/system/document/document.vue'),
            name: '文档管理',
            meta: {
              title: '文档管理',
              roles: [16]
            }
          },
          {
            path: '/system/document/document_add',
            component: () => import('@/views/system/document/document_add.vue'),
            name: '新增文档',
            hidden: true,
            meta: {
              title: '新增文档',
              roles: [16]
            }
          },
          {
            path: '/system/document/document_edit/:id',
            component: () => import('@/views/system/document/document_edit.vue'),
            name: '更新文档',
            hidden: true,
            meta: {
              title: '更新文档',
              roles: [16]
            }
          }
        ]
      },
      {
        path: '/system/menu_base',
        component: () => import('@/views/system/menu/menu_index.vue'),
        hidden: true,
        name: '管理菜单',
        meta: {
          title: '管理菜单',
          roles: [16]
        },
        children: [
          {
            path: '/system/menu',
            component: () => import('@/views/system/menu/menu.vue'),
            name: '菜单管理',
            meta: {
              title: '菜单管理',
              roles: [16]
            }
          },
          {
            path: '/system/menu/menu_add',
            component: () => import('@/views/system/menu/menu_add.vue'),
            name: '新增菜单',
            hidden: true,
            meta: {
              title: '新增菜单',
              roles: [16]
            }
          },
          {
            path: '/system/menu/menu_edit/:id',
            component: () => import('@/views/system/menu/menu_edit.vue'),
            name: '更新菜单',
            hidden: true,
            meta: {
              title: '更新菜单',
              roles: [16]
            }
          }
        ]
      },
      {
        path: '/system/message_base',
        component: () => import('@/views/system/message/message_index.vue'),
        name: '管理消息',
        meta: {
          title: '管理消息',
          roles: [16]
        },
        children: [
          {
            path: '/system/message',
            component: () => import('@/views/system/message/message.vue'),
            name: '消息通知',
            meta: {
              title: '消息通知',
              roles: [16],
              activeMenu: '/system/message'
            }
          },
          {
            path: '/system/message/message_detail/:id',
            component: () => import('@/views/system/message/message_detail.vue'),
            hidden: true,
            name: '查看消息',
            meta: {
              title: '查看消息',
              roles: [16],
              activeMenu: '/system/message'
            }
          }
        ]
      }
    ]
  },
  {
    path: '/special',
    component: Layout,
    redirect: 'noRedirect',
    hidden: true,
    name: 'special',
    meta: {
      title: '特种设备',
      icon: 'iconfont icon-special-event-alarm_line',
      roles: [16, 112, 113]
    },
    children: [
      {
        path: '/special/equipment_base',
        component: () => import('@/views/special/equipment/equipment_index.vue'),
        name: '特种设备管理',
        meta: {
          title: '特种设备管理',
          roles: [16, 112, 113]
        },
        children: [
          {
            path: '/special/equipment',
            component: () => import('@/views/special/equipment/equipment.vue'),
            name: '特种设备台账',
            meta: {
              title: '设备台账',
              roles: [16, 112, 113]
            }
          },
          {
            path: '/special/equipment/equipment_add',
            component: () => import('@/views/special/equipment/equipment_add.vue'),
            name: '新增特种设备',
            hidden: true,
            meta: {
              title: '新增设备',
              roles: [16, 112, 113]
            }
          },
          {
            path: '/special/equipment/equipment_edit/:id',
            component: () => import('@/views/special/equipment/equipment_edit.vue'),
            name: '更新特种设备',
            hidden: true,
            meta: {
              title: '更新设备',
              roles: [16, 112, 113]
            }
          }
        ]
      },
      {
        path: '/special/group_base',
        component: () => import('@/views/special/group/group_index.vue'),
        name: '特种设备组管理',
        meta: {
          title: '特种设备组管理',
          roles: [16, 112, 113]
        },
        children: [
          {
            path: '/special/group',
            component: () => import('@/views/special/group/group.vue'),
            name: '特种设备组',
            meta: {
              title: '设备组',
              roles: [16, 112, 113]
            }
          },
          {
            path: '/special/group/group_add',
            component: () => import('@/views/special/group/group_add.vue'),
            name: '新增特种设备组',
            hidden: true,
            meta: {
              title: '新增设备组',
              roles: [16, 112, 113]
            }
          },
          {
            path: '/special/group/group_edit/:id',
            component: () => import('@/views/special/group/group_edit.vue'),
            name: '更新特种设备组',
            hidden: true,
            meta: {
              title: '更新设备组',
              roles: [16, 112, 113]
            }
          }
        ]
      }
    ]
  },
  {
    path: '/charts',
    component: Layout,
    redirect: 'noRedirect',
    hidden: false,
    name: 'charts',
    meta: {
      title: '报表管理',
      icon: 'iconfont icon-special-event-alarm_line',
      roles: [16, 112, 113]
    },
    children: [
      {
        path: '/charts/asset_base',
        component: () => import('@/views/charts/asset/asset_index.vue'),
        name: '资产报表管理',
        meta: {
          title: '资产报表管理',
          roles: [16, 112, 113]
        },
        children: [
          {
            path: '/charts/asset',
            component: () => import('@/views/charts/asset/asset.vue'),
            name: '资产报表',
            meta: {
              title: '资产报表',
              roles: [16, 112, 113]
            }
          }
        ]
      },
      {
        hidden: true,
        path: '/charts/preservation_base',
        component: () => import('@/views/charts/preservation/preservation_index.vue'),
        name: '保全报表管理老版',
        meta: {
          title: '保全报表管理老版',
          roles: [16, 112, 113]
        },
        children: [
          {
            path: '/charts/preservation',
            component: () => import('@/views/charts/preservation/preservation.vue'),
            name: '保全报表老版',
            meta: {
              title: '保全报表老版',
              roles: [16, 112, 113]
            }
          }
        ]
      },
      {
        path: '/charts/preservation_base1',
        component: () => import('@/views/charts/preservation/preservation_index.vue'),
        name: '保全报表管理',
        meta: {
          title: '保全报表管理',
          roles: [16, 112, 113]
        },
        children: [
          {
            path: '/charts/preservation1',
            component: () => import('@/views/charts/preservation/charts.vue'),
            name: '保全报表',
            meta: {
              title: '保全报表',
              roles: [16, 112, 113]
            }
          }
        ]
      },
      {
        path: '/charts/stock_base',
        component: () => import('@/views/charts/stock/stock_index.vue'),
        hidden: true,
        name: '备件报表管理',
        meta: {
          title: '备件报表管理',
          roles: [16, 112, 113]
        },
        children: [
          {
            path: '/charts/stock',
            component: () => import('@/views/charts/stock/stock.vue'),
            name: '备件报表',
            meta: {
              title: '备件报表',
              roles: [16, 112, 113]
            }
          }
        ]
      },
      {
        path: '/month/month_base',
        component: () => import('@/views/charts/month/month_index.vue'),
        name: '车间指标',
        meta: {
          title: '车间指标管理',
          roles: [16, 112, 113]
        },
        children: [
          {
            path: '/charts/month',
            component: () => import('@/views/charts/month/month.vue'),
            name: '指标管理',
            meta: {
              title: '指标管理',
              roles: [16, 112, 113]
            }
          }
        ]
      }
    ]
  },
  // 404 page must be placed at the end !!!
  { path: '*', redirect: '/404', hidden: true }
]

const createRouter = () => new Router({
  // mode: 'history', // require service support
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes
})

const router = createRouter()

// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
  const newRouter = createRouter()
  router.matcher = newRouter.matcher // reset router
}

export default router
